#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QTcpServer>
#include<QTcpSocket>
#include<QHash>
#include<QSet>
#include<QByteArray>
#include<QJsonArray>
#include<QJsonObject>
#include<QJsonDocument>
#include<QSql>
#include<QSqlDatabase>
#include<QSqlQuery>
#include<Windows.h>
#include<QDataStream>
#include<QDataStream>
#include"peopleinfo.h"
#include<QTimer>
#include<QJsonArray>
QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    QTcpServer* ts=new QTcpServer(this);
    QSet<QString> Accounts;  //总的账户
    QVector<QString>RenewAccounts;  //用户更新
    QHash<QString,peopleinfo*> PeopleInfos;  //account 对应peopleinfo
    QTcpSocket* ts_sql;   //sql数据库持久化存储和接收数据的套接字
    int CurPeoplepos=0;
    int CurMespos=0;
    bool ablerenew=false;
public:
private slots:
    void on_pushButton_clicked();

private:
    Ui::Widget *ui;
};
#endif // WIDGET_H
